﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpDay03
{
    public class Train : Transport
    {
        public TrainEngine EngineType { get; set; }
        public int NumCars { get; set; }

        public Train(TrainEngine engineType, int numCars, int maxMph, bool isInUse, int yearCreated, int capacity)
            // the base is used to call parent constructor function. In this example the base is Transport.
            : base(maxMph, isInUse, yearCreated, capacity)
        {
            this.EngineType = engineType;
            this.NumCars = numCars;
        }
    }

    public enum TrainEngine
    {
        steam,
        coal,
        electric
    }
}